package com.five.api.controller;

import com.five.api.service.CaptchaService;
import com.five.vo.BaseResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller
@RequestMapping("captcha")
@CrossOrigin
public class CaptchaController {


    @Autowired
    private CaptchaService captchaService;

    @ResponseBody
    public void doGet(HttpServletRequest request, HttpServletResponse response) {
        captchaService.doGet(request, response);
    }

    @RequestMapping("post")
    public void doPost(HttpServletRequest request, HttpServletResponse response) {
        captchaService.doPost(request, response);
    }


}
